package view.quest
{
import flash.display.MovieClip;
import flash.geom.Point;

import framework.core.UIWidget;
import framework.core.popup.PopUpManager;

/**
 * QuestNPCDialog
 * @author jliang
 * 
 */
public class QuestNPCDialog extends QuestComponent
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function QuestNPCDialog()
	{
		super();
		
		isDisposeWhenRemove = true;
	}
	//==========================================================================
	//  Properties
	//==========================================================================	
	public function set content(value:String):void
	{
		QuestNPCDialogProxy(proxy).content = value;
	}
	
	public function get content():String
	{
		return QuestNPCDialogProxy(proxy).content;
	}
	
	public function set picUrl(value:String):void
	{
		QuestNPCDialogProxy(proxy).picUrl = value;
	}
	
	public function get picUrl():String
	{
		return QuestNPCDialogProxy(proxy).picUrl;
	}
	//==========================================================================
	//  Overridden methods: Component
	//==========================================================================
	override public function initialize():void
	{
		super.initialize();
		
		skin = UIWidget.createUI("swf.ui.QuestNPCDialogSkin") as MovieClip;
		addChild(skin);
		
		proxy = new QuestNPCDialogProxy();
		proxy.parse(skin);
	}
	
	override public function show():void
	{
		if (data.isAccepted)
		{
			uiComplete();
			return;
		}
		super.show();
	}
}
}